package com.hex.ds.hdrs.period.job.dto;

import cn.hutool.core.collection.CollectionUtil;
import com.hex.ds.hdrs.common.utils.HdrsDateUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class PeriodJobCopyDto implements Serializable {

    private List<String> bizDates;

    private List<String> pkIds;

    private String jobCopyStatus;

    private List<String> dateList;

    public List<String> getDateList() {
        if (CollectionUtil.isNotEmpty(bizDates) && bizDates.size() == 2){
           return HdrsDateUtil.getBetweenDates(bizDates.get(0), bizDates.get(1));
        }
        return dateList;
    }
}
